package com.youlai.boot.factory.service.impl;

import com.youlai.boot.core.security.model.UserAuthCredentials;
import com.youlai.boot.factory.service.FactoryMemberService;
import com.youlai.boot.factory.service.UserAuthenticationService;
import com.youlai.boot.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserAuthenticationServiceImpl implements UserAuthenticationService {

    @Autowired
    private UserService userService;

    @Autowired
    private FactoryMemberService factoryMemberService;

    @Override
    public UserAuthCredentials getAuthCredentialsByOpenId(String openId) {
        // 实现获取用户认证凭证的逻辑
        return userService.getAuthCredentialsByOpenId(openId);
    }

    @Override
    public void registerOrBindWechatUser(String openId) {
        // 实现微信用户注册/绑定逻辑
        factoryMemberService.registerOrBindWechatUser(openId);
    }
}
